﻿// using UnityEngine;
// using System.Collections;
// using CinemaDirector;
// using TTGame;
// using TTGameEngine;
//
// [CutsceneItemAttribute("Animation", "LT Anim Trigger", CutsceneItemGenre.ActorItem, CutsceneItemGenre.MecanimItem)]
// public class AnimationSetTrigger : CinemaActorEvent {
//     public string clipName;
//     public AnimEventType functionType;
//     public string par1;
//     public string par2;
//     public string par3;
//     public Transform relationNode;
//
//     public override void Trigger(GameObject actor) {
// #if UNITY_EDITOR
//         if(Application.isPlaying == false) {
//             return;
//         }
// #endif
//
//         Transform cutSceneTF = this.ActorTrackGroup.Cutscene.transform;
//         string skillName = "";
//         if(cutSceneTF.parent != null) {
//             skillName = cutSceneTF.parent.name;
//         }
//
//         AnimationEventData data = new AnimationEventData();
//         data.clipName = clipName;
//         data.animEventType = functionType;
//         data.time = -1;
//         data.par1 = par1;
//         data.par2 = par2;
//         data.par3 = par3;
//         data.relationNode = relationNode;
//
//         BaseEventInfo eventInfo = null;
//         switch(functionType) {
//             //case AnimEventType.Event_PlayVoice: eventInfo = new PlayVoiceEvent(data); break;
//             //case AnimEventType.Event_Shock: eventInfo = new ShockEvent(data); break;
//             case AnimEventType.Event_PlayParticle: eventInfo = new ParticleEvent(data, false); break;
//             case AnimEventType.Event_ParticleMuzzle: eventInfo = new ParticleEvent(data, true); break;
//         }
//
//         if(eventInfo != null) {
//             Puppet puppet = actor.GetComponent<Puppet>();
//             eventInfo.EventAction(puppet);
//         }
//
//     }
// }